package com.whfc.fse.dto;

import com.whfc.fse.constant.BridgeMeasurement;
import lombok.Data;
import org.influxdb.annotation.Column;
import org.influxdb.annotation.Measurement;

import java.io.Serializable;
import java.time.Instant;
import java.util.Date;
import java.util.concurrent.TimeUnit;

/**
 * 架桥机硬件数据
 */
@Data
@Measurement(name = BridgeMeasurement.MEASUREMENT, database = BridgeMeasurement.DATABASE, retentionPolicy = BridgeMeasurement.RETENTION_POLICY, timeUnit = TimeUnit.SECONDS)
public class FseBridgeDataLogDTO implements Serializable {
    /**
     * 硬件时间
     */
    private Date time;

    /**
     * 服务器时间
     */
    private Date createTime;

    /**
     * 硬件时间
     */
    @Column(name = "time")
    private Instant deviceTime;

    /**
     * 服务器时间
     */
    @Column(name = "serverTime")
    private Long serverTime;

    /**
     * 架桥机id
     */
    @Column(name = "bridgeId")
    private String bridgeId;


    /**
     * 前天车起升高度（米）
     */
    @Column(name = "frontLiftHeight")
    private Double frontLiftHeight;

    /**
     * 前天车起升重量（吨）
     */
    @Column(name = "frontLiftWeight")
    private Double frontLiftWeight;

    /**
     * 前天车纵移位置（米）
     */
    @Column(name = "frontLngPosition")
    private Double frontLngPosition;

    /**
     * 前天车横移位置（米）
     */
    @Column(name = "frontLatPosition")
    private Double frontLatPosition;

    /**
     * 后天车起升高度（米）
     */
    @Column(name = "backLiftHeight")
    private Double backLiftHeight;

    /**
     * 后天车起升重量（吨）
     */
    @Column(name = "backLiftWeight")
    private Double backLiftWeight;

    /**
     * 后天车纵移位置（米）
     */
    @Column(name = "backLngPosition")
    private Double backLngPosition;

    /**
     * 后天车横移位置（米）
     */
    @Column(name = "backLatPosition")
    private Double backLatPosition;

    /**
     * 纵移位置（米）
     */
    @Column(name = "lngPosition")
    private Double lngPosition;

    /**
     * 横移位置（米）
     */
    @Column(name = "latPosition")
    private Double latPosition;

    /**
     * 风速（m/s）
     */
    @Column(name = "windSpeed")
    private Double windSpeed;

    /**
     * 主梁水平度（度）
     */
    @Column(name = "levelAngle")
    private Double levelAngle;

    /**
     * 前支垂直度（度）
     */
    @Column(name = "verticalAngle")
    private Double verticalAngle;


    /**
     * 前天车超载状态 0-正常；1-预警
     */
    @Column(name = "frontLiftWarn")
    private Integer frontLiftWarn;

    /**
     * 后天车超载状态 0-正常；1-预警
     */
    @Column(name = "backLiftWarn")
    private Integer backLiftWarn;

    /**
     * 前天车超载次数
     */
    @Column(name = "frontLiftWarnNum")
    private Integer frontLiftWarnNum;

    /**
     * 前天车当前超载次数
     */
    @Column(name = "frontLiftTimeWarnNum")
    private Integer frontLiftTimeWarnNum;

    /**
     * 后天车超载次数
     */
    @Column(name = "backLiftWarnNum")
    private Integer backLiftWarnNum;

    /**
     * 后天车当前超载次数
     */
    @Column(name = "backLiftTimeWarnNum")
    private Integer backLiftTimeWarnNum;

    /**
     * 风速报警次数
     */
    @Column(name = "windWarnNum")
    private Integer windWarnNum;

    /**
     * 风速当前报警次数
     */
    @Column(name = "windTimeWarnNum")
    private Integer windTimeWarnNum;

    /**
     * 删除标记(0-未删除 1-已删除)
     */
    @Column(name = "delFlag")
    private Integer delFlag;

}